<html>
<head><meta charset="utf-8"><title>Running Docker images on OSX · t-infra · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/index.html">t-infra</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html">Running Docker images on OSX</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206171412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171412">(Aug 06 2020 at 17:26)</a>:</h4>
<p>In trying to better understand why <code>i686-gnu-nopt</code> and <code>x86_64-gnu-llvm-8</code> are generating different backtraces in <a href="https://github.com/rust-lang/rust/pull/75048">https://github.com/rust-lang/rust/pull/75048</a>, I've tried to get the respective Docker images running locally (on OS X).  This has thrown up a couple of interesting problems, which I've finally managed to work-around:</p>
<ol>
<li>
<p>By default on Docker Desktop for Mac, the bind mounts defined in <code>src/ci/docker/run.sh</code> use osxfs—this uses 64-bit inodes, which causes problems in 32-bit containers  such as <code>i686-gnu-nopt</code>.  Best workaround I've been able to find is to use NFS mounts instead; would a PR to <code>run.sh</code> that  selects a different volume type depending on host be appropriate, or is that out-of-scope for the CI scripts (in which case perhaps it should be documented somewhere instead)?</p>
</li>
<li>
<p>When using an NFS mount, Python's <code>TarFile.extract</code> fails to set file permissions due to an exception being raised on attempting to set file ownership (which it only attempts to do because the Docker user is root).  Best workaround I've been able to find is to switch to a non-root user in the Docker container and then run the build from there.  Likewise, would a PR that switches all containers to using a non-root user be acceptable?</p>
</li>
</ol>



<a name="206171623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171623">(Aug 06 2020 at 17:28)</a>:</h4>
<p>I'd have posted as issues on Github but I wasn't sure whether infra related things belong on <code>rust-lang/rust</code> or in another repo?</p>



<a name="206171680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171680">(Aug 06 2020 at 17:28)</a>:</h4>
<p>rust-lang/rust is appropriate for things related to rust-lang/rust's infrastructure</p>



<a name="206171688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171688">(Aug 06 2020 at 17:28)</a>:</h4>
<p>(e.g., ci scripts)</p>



<a name="206171730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171730">(Aug 06 2020 at 17:29)</a>:</h4>
<p>Okay, good to know!   You're everywhere, Mark.  :)</p>



<a name="206171915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171915">(Aug 06 2020 at 17:30)</a>:</h4>
<p><span class="user-mention" data-user-id="249694">@eggyal</span> The current PR CI failure seems like it's not due to a platform difference, though maybe things are even more questionable than I thought..</p>



<a name="206171989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206171989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206171989">(Aug 06 2020 at 17:31)</a>:</h4>
<p>I'm leaning towards it being an LLVM difference, but that's why I wanted to get the Docker images running—so I can inspect the IR.</p>



<a name="206172009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172009">(Aug 06 2020 at 17:31)</a>:</h4>
<p>hm, that would be surprising to me</p>



<a name="206172128"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172128" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172128">(Aug 06 2020 at 17:32)</a>:</h4>
<p>You don't think it could be the frame being TCO'd by LLVM in some situations but not others?</p>



<a name="206172162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172162">(Aug 06 2020 at 17:32)</a>:</h4>
<p>It's not impossible, I guess, but I would not expect that personally</p>



<a name="206172222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172222">(Aug 06 2020 at 17:33)</a>:</h4>
<p>did you try the black_box on main that you mentioned?</p>



<a name="206172235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172235">(Aug 06 2020 at 17:33)</a>:</h4>
<p>Still, once I have the Dockers running I can poke around a bit.</p>



<a name="206172292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172292">(Aug 06 2020 at 17:33)</a>:</h4>
<p>I added <code>black_box</code> to the closure that invokes <code>main</code> but that didn't cause the closure to have its own frame on OS X.</p>



<a name="206172314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172314">(Aug 06 2020 at 17:33)</a>:</h4>
<p>I would not be opposed to a patch to our <a href="http://run.sh">run.sh</a> that fixed docker on mac, though we'd probably want to make sure it's not affecting CI just in case</p>



<a name="206172363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172363">(Aug 06 2020 at 17:34)</a>:</h4>
<p>(can just turn it off on CI)</p>



<a name="206172427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172427">(Aug 06 2020 at 17:34)</a>:</h4>
<p>I think we may need a root user in the containers for other reasons -- I imagine we might be able to avoid the exception, though by setting some flags on Python's TarFile.extract?</p>



<a name="206172549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172549">(Aug 06 2020 at 17:35)</a>:</h4>
<p>I looked through the Python source and don't think the exception can be avoided, but it's only an issue because executables in <code>/bin</code> are not being set <code>+x</code> so one could manually set those perms after.</p>



<a name="206172657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172657">(Aug 06 2020 at 17:36)</a>:</h4>
<p>"manually" -&gt; in <code>bootstrap.py</code> I mean</p>



<a name="206172720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172720">(Aug 06 2020 at 17:37)</a>:</h4>
<p>Yeah I would be fine with that if it's needed</p>



<a name="206172815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172815">(Aug 06 2020 at 17:37)</a>:</h4>
<p><span class="user-mention" data-user-id="249694">@eggyal</span> did you produce the current .stderr file on macOS? Or is the current output from the i686-nopt builder?</p>



<a name="206172865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172865">(Aug 06 2020 at 17:38)</a>:</h4>
<p>oh, that might actually be the problem now that I think of it</p>



<a name="206172876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172876">(Aug 06 2020 at 17:38)</a>:</h4>
<p>the nopt builders don't have optimizations on (in tests)</p>



<a name="206172926"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206172926" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206172926">(Aug 06 2020 at 17:38)</a>:</h4>
<p>I think there's a compiletest flag to override that, let me look</p>



<a name="206173129"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206173129" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206173129">(Aug 06 2020 at 17:40)</a>:</h4>
<p>hm I don't think there's anything dedicated, but you can try a <code>// compile-flags: -O</code></p>



<a name="206173171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206173171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206173171">(Aug 06 2020 at 17:40)</a>:</h4>
<p><span class="user-mention" data-user-id="249694">@eggyal</span> mind doing that? my hope is that we can then get consistent output between the nopt and non-nopt builders, and then proceed</p>



<a name="206173186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206173186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206173186">(Aug 06 2020 at 17:40)</a>:</h4>
<p>(Presumably, the output the PR builder is giving)</p>



<a name="206173300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242791-t-infra/topic/Running%20Docker%20images%20on%20OSX/near/206173300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eggyal <a href="https://rust-lang.github.io/zulip_archive/stream/242791-t-infra/topic/Running.20Docker.20images.20on.20OSX.html#206173300">(Aug 06 2020 at 17:42)</a>:</h4>
<p>Sure I'll give it a crack.  Will have to do it via CI though as my croaky old MacBook is still building LLVM for <code>i686-gnu-nopt</code> <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>